# 这是一个示例 Python 脚本。

# 按 Shift+F10 执行或将其替换为您的代码。
# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。

 # 按 Ctrl+F8 切换断点。




# 访问 https://www.jetbrains.com/help/pycharm/ 获取 PyCharm 帮助

# from selenium import webdriver
# from time import sleep
# from selenium.webdriver.common.by import By
# def demo1():
#     #安装谷歌浏览器 执行测试代码
#     driver = webdriver.Chrome()
#     sleep(2)
#     driver.get("http://www.baidu.com")
#     sleep(5)
#     driver.close()
#     driver.quit()
# def demo2():
#      driver = webdriver.Chrome()
#      driver.get("http://www.baidu.com")
#      ls=driver.find_elements(By.TAG_NAME,'input')
#      for aa in ls:
#           aa.send_keys('周慧敏')
#           sleep(2)
         
     # print(driver.title)
     # print(driver.current_url)
     # sleep(5)
     # driver.refresh()
     # print( driver.find_element(By.LINK_TEXT,'新闻').text)
     # print(driver.find_element(By.ID, 'su').size)
     # print(driver.find_element(By.ID, 'su').get_attribute('type'))
     # driver.find_element(By.CSS_SELECTOR,"#kw").send_keys('蔡徐坤')
     # sleep(3)
     # driver.back()
     # driver.forward()
     # sleep(5)
     # driver.find_element(By.CSS_SELECTOR,"#kw").clear()
     # sleep(5)
     # driver.find_element(By.ID,'su').click()
     # sleep(3)
#      driver.close()
#      driver.quit()
# if __name__=='__main__':
#     demo2()
# def count_prefixes(words, s):
#     count = 0
#     for word in words:
#         if s.startswith(word):
#             count += 1
#     return count
# words1 = ["a", "b", "c", "ab", "bc", "abc"]
# s1 = "abc"
# print(count_prefixes(words1, s1))
# for i in range(1,11):
#     print(i)
# i=1
# while i<=10:
#     print(i)
#     i +=1
#
# sum=0
# for i in range(1,11):
#     sum +=i
# print(sum)
# #
# i = 1
# sum = 0
# while i <= 10:
#     sum += i  # 累加当前的 i
#     i += 1    # 计数器递增
# print("1 到 10 的和是:", sum)
for i in range(1,10):
    for j in range(1,i+1):
        sum=i*j
        print(f'{i}*{j}={sum}',end="\t")# 使用制表符对齐
    print()# 每行结束后换行

i = 1  # 初始化行计数器
while i <= 9:
    j = 1  # 初始化列计数器
    while j <= i:
        print(f"{j} × {i} = {i * j}", end="\t")
        j += 1  # 列计数器递增
    print()  # 换行
    i += 1  # 行计数器递增

 